/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lenovo
 * Date: 2025-03-24
 * Time: 21:18
 */
// USB 键盘类
public class KeyBoard implements IUSB {
    @Override
    public void openDevice() {
        System.out.println("打开键盘");
    }

    @Override
    public void work() {  // 键盘的核心功能
        input();
    }

    private void input() {  // 键盘特有方法
        System.out.println("键盘输入数据...");
    }

    @Override
    public void closeDevice() {
        System.out.println("关闭键盘");
    }
}

